<?php

namespace app\common\model;

use think\model\concern\SoftDelete;

class MemberAccount extends BaseModel
{
    /**
     * @var bool
     */
    use SoftDelete;

    const TypeRecharge = 1;
    const TypeWithdraw = 2;

    //[0：删除；1：审核中；2：打款中；3：成功；4：拒绝]',
    const StatusDeleted = 0;
    const StatusVerify = 1;
    const StatusPaying = 2;
    const StatusSuccess = 3;
    const StatusRefuse = 4;

    protected $deleteTime = 'delete_time';
    protected $defaultSoftDelete = 0;

    public function __construct(array $data = [])
    {
        parent::__construct($data);
    }

    public function member()
    {
        return $this->hasOne(Member::class, 'id', 'member_id');
    }

    public function third()
    {
        return $this->hasOne(MemberThird::class, 'member_id', 'member_id');
    }
}